package com.tjmc.recruit.user.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tjmc.company.api.entity.JobInfoEntity;
import com.tjmc.recruit.user.entity.PersonalReadRecordsEntity;
import com.tjmc.recruit.user.mapper.PersonalReadRecordsMapper;
import com.tjmc.recruit.user.service.PersonalReadRecordsService;
import com.tjmc.recruit.user.vo.ResumeInfoVO;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * 个人浏览记录表
 *
 * @author recruit
 * @date 2024-11-11 17:22:39
 */
@Service
public class PersonalReadRecordsServiceImpl extends ServiceImpl<PersonalReadRecordsMapper, PersonalReadRecordsEntity> implements PersonalReadRecordsService {

    @Override
    public Page<JobInfoEntity> getReadJobPage(Page page, PersonalReadRecordsEntity personalReadRecords) {
        Page<PersonalReadRecordsEntity> entityPage = new Page<>(page.getCurrent(), page.getSize());
        Map<String, Object> map = new HashMap<>();
        map.put("accountId", personalReadRecords.getAccountId());
        return baseMapper.getReadJobPage(entityPage, map);
    }

    @Override
    public Page<ResumeInfoVO> getCheckCompanyPage(Page page, Long companyId) {
        return baseMapper.getCheckCompanyPage(page, companyId);
    }
}
